     ,,,



+++++++++    ***   +++++++++++++

   ,,,,,  VBorg ,,,,,

 vb3 gold

    darkblue     images

  ,,,

   ,,,      


      


http://www.nabdh-alm3ani.net/test/index.php?s&styleid=4

 ,,,     ,,,

   

              index.php

+++++++++    ***   +++++++++++++



   
http://www.nabdh-alm3ani.net/nabdhat/index.php?



+++++++++++++++++++++++++++++++++++++++++++
--------------------------------------------------------------------------------
         ,,,,,  
--------------------------------------------------------------------------------
      
  
 phpinclude_start
 
header




1. Open index.php.  

a) Find:  

 
    'forumhome_subforumseparator_post' 
); 


Replace with:   


    'forumhome_subforumseparator_post', 
    'header' 
); 


b) Find: 

PHP: 
eval('$navbar = "' . fetch_template('navbar') . '";'); 


ABOVE this, add:    


// Who's Online on Every Page Hack 
eval('$header = "' . fetch_template('header') . '";'); 
// Who's Online on Every Page Hack 



2. Now let's edit templates. Add the following to the TOP of your "phpinclude_start" template:
   
 phpinclude_start
    

if (strpos($_SERVER['PHP_SELF'], 'index.php') == false) { 
$datecut = TIMENOW - $vboptions['cookietimeout']; 
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut"); 
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut"); 
$headerguests=$headerguests[count]; 
$headerusers=$headerusers[count]; 
$totalonline=$headerguests+$headerusers; 
} 



3. Lastly, let's edit the "header" template.
   
header

Add this anywhere you want the total number of Users Online Now to show.
        


$totalonline  



Done!


 
 